<%@page import="entity.StudentBanjiInfoVO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="entity.Student"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="static/bootstrap-3.3.7-dist/css/bootstrap.css"/>
</head>
<body>
	<!-- <button class="btn btn-primary">添加</button> -->
	<%-- <a class="btn btn-primary" href="<%=request.getContextPath()%>/student_insert.jsp">添加</a> --%>
	<a class="btn btn-primary" href="<%=request.getContextPath()%>/student?method=getStudentInsertPage">添加</a>
 	<!-- 在jsp页面中可以嵌套java代码 -->
 	<%
 		// 1、将数据放到req这个内存中
 		// req.setAttribute("list", list);
 		// 在jsp页面中requst是一个内置对象，名字已经写好了
 		ArrayList<StudentBanjiInfoVO> list = (ArrayList<StudentBanjiInfoVO>)request.getAttribute("list");	
 	%>
 		<table class="table table-striped table-bordered table-hover table-condensed">
			<tr>
				<th>ID</th>
				<th>名字</th>
				<th>年龄</th>
				<th>性别</th>
				<th>班级名字</th>
			</tr>
			<%
			    for (StudentBanjiInfoVO studentBanjiInfoVO : list) {
			%>
			    	<tr>
						<td><%=studentBanjiInfoVO.getId()%></td>
						<td><%=studentBanjiInfoVO.getName()%></td>
						<td><%=studentBanjiInfoVO.getAge()%></td>
						<td><%=studentBanjiInfoVO.getGender()%></td>
						<td><%=studentBanjiInfoVO.getBanjiName()%></td>
					</tr>
			<%
			    }
			%>
		</table>
		
 	
</body>
</html>